#{extends 'main.html' /} #{set title:'Home' /}

<!-- @author Heidi ElToukhy
This page retrieves a list of members that the registeredUser added in his publicList for privacy settings
with a button remove next to each member to remove him from the list -->

<body style="background-color: white;">
	<h1>
		<font size="3" face="New times roman" color="red"> <i>
				Members in your Public List : </i> </font>
	</h1>

	#{ifnot publicList1}
	<p>There are no members !!</p>

	#{/ifnot}

	<script type="text/javascript">
		function show_alert() {
			alert("You Have Successfully Removed The Member !");
		}
	</script>
#{if !publicList1.empty}
	<table width="300" id="dataTable" background="lightblue" ; border="2"
		; BORDERCOLOR=#FF6600>
		<tr>
			<th
				style="background-color: #778899; font-family: Arial; font-size: 20px"><p
					style="color: white;">Members</p></th>
			<th
				style="background-color: #778899; font-family: Arial; font-size: 20px"><p
					style="color: white;">Action</p> #{list items:publicList1,as:'Public'}
		</tr>
		<td>
			<div id="${Public.id}">
				<ul>

					<li>
						<h4>${Public.name}</h4>
					</li>
				</ul>
				<ul>
					<h4>${Public.mail}</h4>
				</ul>
			</div>
		</td>
		<!-- Heidi ElToukhy
This is a button that enables the  registeredUser to remove another member from either a private or a public list-->
		<td>
			<form action="@{Application.removeFromList()}" method="GET">
				<div id="${Public.id}">
					<input style="visibility: hidden;" type="text" name="x"
						value="true" /><br>
					<button name="remove" type="submit" onclick="show_alert()"
						value="${Public.id}">Remove</button>
				</div>
				<hr>
			</form>
		</td> #{/list}
		<!-- End @author Heidi ElToukhy-->
	</table>
	#{/if}

	<a href="@{Registeredusers.setprivacy()}">Back to Privacy Settings</a>
	<a href="@{Application.viewprofile()}">Back to Profile Page</a>
</body>
